<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@taglib prefix="s" uri="strutsTags"%>
<%@taglib prefix="ty" uri="/wyzzTags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
	<base href="<%=basePath%>">
	<head>
		<!-- css修饰信息 -->
		<link href="<s:url value="/resource/css/style.css"/>" rel="stylesheet"
			type="text/css" />
		<jsp:include flush="true" page="/sitemesh/jsPackage.jsp"></jsp:include>
		<!-- 自己添加 -->
		<script type="text/javascript" src="resource/js/hrm/examin.js"></script>
		<script type="text/javascript" src="dwr/interface/MYOT.js"></script>
		<title>HR备案加班列表</title>
	</head>
	<body onload="hrm.common.check_order();">
		<jsp:include flush="true" page="dlg_leaveorovertime_examin.jsp"></jsp:include>
		<jsp:include flush="true" page="/configuration/log.jsp"></jsp:include>
		<jsp:include flush="true" page="div_overtimeshow.jsp"></jsp:include>
		<br />
		<s:component template="bodyhead">
		</s:component>

		<form id="actionSrc" name="actionSrc"
			action="<s:property value='actionSrc'/>" method="POST">

			<!--隐藏信息-->
			<s:hidden id="srcAction" name="srcAction" />
			<s:hidden id="operation" name="page.operate" value="" />
			<s:hidden id="operate" name="page.operate" />
			<s:hidden id="page.currentPage" name="page.currentPage" />
			<s:hidden id="order" name="page.order" />
			<s:hidden id="infoMeg" name="infoMeg" value="" />
			<s:hidden id="orIdUp" name="orIdUp" />
			<s:hidden id="approveOper" name="approveOper" value="" />
			<s:hidden id="of_Bean_orAppComment" name="of_Bean.orAppComment"
				value="" />
			<s:hidden id="formIstiaoxiu" name="of_Bean.isTiaoxiu" />
			<s:hidden id="formOrTiaoxiuHours" name="of_Bean.orTiaoxiuHours" />
			<s:hidden id="formOrTiaoxiuExpire" name="of_Bean.orTiaoxiuExpire" />
			<table width="100%" class="formtable">
				<tr>
					<td>
						<table width="100%" border="0" cellspacing="0" cellpadding="0"
							id="tblSearchCondition">
							<tr>
								<s:textfield label="员工" id="es_Bean.emp" name="es_Bean.emp"
									size="14" maxlength="64"></s:textfield>
								<td align="right">
									组织单元:
								</td>
								<td>
									<s:orgselector id="orgselector1" name="es_Bean.depNos"
										hiddenFieldName="es_Bean.depNo" />
								</td>
								<td align="right">
									开始日期:
								</td>
								<td>
									<s:textfield id="es_Bean_startDate" name="es_Bean.startDate"
										required="true" size="10" maxlength="10" />
									<img onclick="WdatePicker({el:'es_Bean_startDate'})"
										class="dateimg"
										src="resource/js/My97DatePicker/skin/datePicker.gif">
								</td>
								<s:select label="加班种类" id="es_Bean.typeNo" name="es_Bean.typeNo"
									list="otTypeList" listKey="otNo" listValue="otName"
									emptyOption="true" />
							</tr>
							<tr>
								<s:textfield label="编号" id="es_Bean.no" name="es_Bean.no"
									size="14" maxlength="14"></s:textfield>
								<s:textfield label="理由" id="es_Bean.reason"
									name="es_Bean.reason" size="16" maxlength="128"></s:textfield>
								<td align="right">
									结束日期:
								</td>
								<td>
									<s:textfield id="es_Bean_endDate" name="es_Bean.endDate"
										required="true" size="10" maxlength="10" />
									<img onclick="WdatePicker({el:'es_Bean_startDate'})"
										class="dateimg"
										src="resource/js/My97DatePicker/skin/datePicker.gif">
								</td>
							</tr>
						</table>
					</td>
					<td rowspan="2">
						<input title="[Alt+F]" accesskey="F" name="submit_search"
							id="submit_search" class="button" type="submit" value="查询">
						<input title="[Alt+A]" accesskey="A" name="submit_all"
							id="submit_all" class="button" type="button"
							onclick="window.location='hrOvertimeSearch.action'" value="重置">
						<br>
					</td>
				</tr>
			</table>

			<!-- 操作 -->
			<div class="operatediv">
				<span class="operatedivleft"> <s:if
						test="es_Bean!=null&&es_Bean.result!=null&&!es_Bean.result.isEmpty()">
						<input id="batchButton_a" name="batchButton_a" class="button"
							type="button"
							onclick="hrm.examin.showRejectDiv('approve','logComents_r');"
							value="批准">
						<input id="batchButton_t" name="batchButton_t" class="button"
							type="button"
							onclick="hrm.examin.showRejectDiv('tiaoxiu','logComents_r');"
							value="批准调休">
						<input id="batchButton_r" name="batchButton_r" class="button"
							type="button"
							onclick="hrm.examin.showRejectDiv('reject','logComents_r');"
							value="拒绝">
					</s:if> </span>
				<span class="operatedivright">本次查询共得到<s:property
						value="page.totalRows" />条加班记录</span>
			</div>

			<table cellpadding="0" cellspacing="0" width="100%" border="0"
				class="gridtableList">
				<tr>
					<th>
						<input id="changIds" name="changIds" class="checkbox"
							type="checkbox"
							onclick="hrm.common.checkAllByName('changIds','changIds');;"
							value="选中">
					</th>
					<th>
						<a href="#" onclick="hrm.common.order_submit('id','actionSrc')">编号</a>
						<img src='resource/images/arrow_.gif' width='8' height='10'
							id='id_img'>
					</th>
					<th>
						<a href="#" onclick="hrm.common.order_submit('emp','actionSrc')">员工姓名</a>
						<img src='resource/images/arrow_.gif' width='8' height='10'
							id='emp_img'>
					</th>
					<th>
						<a href="#" onclick="hrm.common.order_submit('dep','actionSrc')">部门</a>
						<img src='resource/images/arrow_.gif' width='8' height='10'
							id='dep_img'>
					</th>
					<th>
						<a href="#" onclick="hrm.common.order_submit('type','actionSrc')">种类</a>
						<img src='resource/images/arrow_.gif' width='8' height='10'
							id='type_img'>
					</th>
					<th>
						<a href="#"
							onclick="hrm.common.order_submit('reason','actionSrc')">加班理由</a>
						<img src='resource/images/arrow_.gif' width='8' height='10'
							id='reason_img'>
					</th>
					<th>
						<a href="#"
							onclick="hrm.common.order_submit('startT','actionSrc')">加班时间</a>
						<img src='resource/images/arrow_.gif' width='8' height='10'
							id='startT_img'>
					</th>
					<th>
						<a href="#" onclick="hrm.common.order_submit('total','actionSrc')">小时数</a>
						<img src='resource/images/arrow_.gif' width='8' height='10'
							id='total_img'>
					</th>
					<th>
						<a href="#" onclick="hrm.common.order_submit('statu','actionSrc')">状态</a>
						<img src='resource/images/arrow_.gif' width='8' height='10'
							id='statu_img'>
					</th>
					<th>
						操作
					</th>
				</tr>
				<s:if
					test="es_Bean!=null&&es_Bean.result!=null&&!es_Bean.result.isEmpty()">
					<s:iterator value="es_Bean.result" status="index">
						<tr>
							<td align="center">
								<s:if
									test="orStatus<@com.wyzz.hr.base.Status@OTR_STATUS_HR_APPROVE">
									<input id="changIds" type="checkbox" name="changIds"
										class="checkbox" value="<s:property value='orId'/>" />
								</s:if>
								<s:else>
									&nbsp;
								</s:else>
							</td>
							<td align="center">
								<span onclick="ShowOT('<s:property value='orId'/>')"
									class="view"><s:property value="orNo" /> </span>
							</td>
							<td align="center">
								<s:property value="orEmpNo.empName" />
							</td>
							<td align="center" nowrap="nowrap">
								<s:property value="orEmpDept.departmentName" />
							</td>
							<td align="center" nowrap="nowrap">
								<s:property value="orOtNo.otName" />
							</td>
							<td>
								<s:property value="orReason" />
							</td>
							<td align="center">
								<s:date name="orStartDate" format="yyyy-MM-dd HH:mm" />
								~
								<s:property value="get24Point(orEndDate)" />
								<!-- <s:date name="orEndDate" format="HH:mm" /> -->
							</td>
							<td>
								<s:property
									value="@com.wyzz.hr.util.MyTools@decimalFormat(orTotalHours, 4, 1)" />
							</td>
							<td nowrap="nowrap"
								onclick="LogShowDiv('<s:property value="orId" />','overtimerequest',this);"
								onMouseOut="hideLog('logTable');">
								<span class="view"><s:property value="orStatusMean" /> </span>
							</td>
							<td align="center" nowrap="nowrap">
								<img
									onclick="hrm.common.submitForm('actionSrc','examin/showOTApprove_HR.action','orIdUp','<s:property value='orId'/>','srcAction','hrApprove');"
									alt='HR备案' title='HR备案' class="urlimg"
									src="resource/images/MgrApprove.gif" />
								<img
									onclick="hrm.examin.setId('<s:property value='orId'/>');hrm.examin.showRejectDiv('reject','logComents_r');"
									alt="拒绝" title="拒绝" class="urlimg"
									src="resource/images/MgrReject.gif" />
							</td>
						</tr>
					</s:iterator>
				</s:if>
				<s:else>
					<tr>
						<td align="center" colspan="11">
							不存在符合条件的加班单！
						</td>
					</tr>
				</s:else>
			</table>
			<s:pager end="page.end" pageNo="page.currentPage"
				totalRows="page.totalRows" totalPages="page.totalPages"
				formId="actionSrc" start="page.start" />
			<s:if
				test="es_Bean!=null&&es_Bean.result!=null&&!es_Bean.result.isEmpty()">
				<table cellpadding="0" cellspacing="0" width="100%" border="0">
					<tr>
						<td>
							<input id="batchButton_a" name="batchButton_a" class="button"
								type="button"
								onclick="hrm.examin.showRejectDiv('approve','logComents_r');"
								value="批准">
							<input id="batchButton_t" name="batchButton_t" class="button"
								type="button"
								onclick="hrm.examin.showRejectDiv('tiaoxiu','logComents_r');"
								value="批准调休">
							<input id="batchButton_r" name="batchButton_r" class="button"
								type="button"
								onclick="hrm.examin.showRejectDiv('reject','logComents_r');"
								value="拒绝">
						</td>
					</tr>
				</table>
			</s:if>
		</form>
	</body>
	<script type="text/javascript">
	    
model.simple.setParentIFrameFull("IFrame1"); // add by w（计算iframe高度）
 
//审批动作公用方法(参数分别为同意或拒接，备注信息Id，接受备注信息Id，表单Id，Action名)
function batchReject(){
   commonbatch('approveOper','logComents_r','of_Bean_orAppComment','actionSrc','hrOtApproveOrReject.action')
}
  
hrm.common.initDialog('dlgOtShow');
hrm.common.initDialog('dlgHrApproveOT');
</script>
</html>